﻿#include "VisualizerGlobal.h"

using namespace Server::MirDatabase;

namespace Server::MirForms::VisualMapInfo::Class
{

VisualizerGlobal::Cursor *Cursor = Cursors::Arrow;

    void VisualizerGlobal::ActivateFocusMode(std::any o, EventArgs *s)
    {
        if (FocusModeActivated != nullptr)
        {
            for (auto listener : FocusModeActivated->listeners())
            {
                listener(nullptr, nullptr);
            }
        }
    }

Server::MirDatabase::MapInfo *VisualizerGlobal::MapInfo;
int VisualizerGlobal::ZoomLevel = 1;
bool VisualizerGlobal::FocusMode = false;

    bool VisualizerGlobal::getFocusModeActive()
    {
        return FocusMode;
    }

    void VisualizerGlobal::setFocusModeActive(bool value)
    {
        FocusMode = value;
        if (FocusMode == true)
        {
            ActivateFocusMode(std::any(), nullptr);
        }
    }

MapInfo *VisualizerGlobal::ActiveMap;
Bitmap *VisualizerGlobal::ClippingMap = nullptr;
VisualizerGlobal::Tool VisualizerGlobal::SelectedTool = Tool::Select;
VisualizerGlobal::FocusType VisualizerGlobal::SelectedFocusType = static_cast<FocusType>(0);
Server::MirForms::VisualMapInfo::Control::MineEntry *VisualizerGlobal::FocusMineEntry;
Server::MirForms::VisualMapInfo::Control::RespawnEntry *VisualizerGlobal::FocusRespawnEntry;
}
